/*
 *  $Id: IceShards.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Water.Spells {
    public class IceShards: SpellCard<Creature> {
        public IceShards(): base("001_w_s_ice_shards") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Water;
            Value = 100;
            Target = CreatureTarget.Enemy;
            AddManaCost(ElementType.Water, 4);
        }

        protected override void DoAction(TargetArgs<Creature> args) {
            int dice = args.Player.Game.GetDiceNextValue();
            int dmg = dice - 2, wound = 5 - dice;
            if (dmg > 0) args.Target.DamageBy(NewDamage(args, dmg));
            if (wound > 0) args.Target.AddAffect(new Affects.Wound(wound));
        }
    }
}
